<template>
  <div>
    <div class="right-container">
      <div class="avatar-div">
        <el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png" />
        <div class="say-hi">
          <span>Hi!你好</span>
        </div>
      </div>
      <div class="but-group">
        <el-row v-if="isLogin">
          <div>欢迎来到趣淘商城</div>
        </el-row>
        <el-row v-else>
          <el-button type="primary" size="medium" @click="toLogin">登陆</el-button>
          <el-button type="primary" size="medium" @click="toRegister">注册</el-button>
        </el-row>
      </div>
      <div class="img-div">
        <img src="../../assets\staticbook\static-book-1.jpg" />
        <img src="../../assets\staticbook\static-book-2.jpg" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
    }
  },
  computed: {
    isLogin() {
      return this.$store.getters.isLogin
    }
  },
  methods: {
    toLogin() {
      this.$router.push('/lr/login')
    },
    toRegister() {
      this.$router.push('/lr/register')
    }
  }
}
</script>

<style lang="scss" scoped>
.right-container {
  text-align: center;
  .avatar-div {
    display: flex;
    flex-direction: column;
    // justify-content: space-around;
    align-items: center;
    width: 100%;
    margin: 20px auto;
  }
  .img-div {
    margin-top: 10px;
    img {
      width: 100%;
    }
  }
}
</style>
